As fabrication processes of semiconductors improve, mobile devices such as mobile phones and tablets are incorporated with more functionalities (e.g., having a camera for capturing an image and/or a video), are manufactured with lower cost, and are therefore becoming widely used. However, conventional mobile devices are unable to directly obtain a size of an object (or a distance between two targets) in the image captured thereby. Currently, one way of obtaining the size of the object is to place a reference object (e.g., a coin, a ruler, etc.) near the object in order to obtain an estimate of the size, which is inconvenient and inaccurate.